<?php
declare (strict_types = 1);

namespace app\admin\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Finance extends Model
{
    //

    protected $schema = [
        'id' => 'int',
        'amount_money' => 'int',
        'status' => 'int',
        'description' => 'string',
        'apply_user_id' => 'int',
        'reviewer_id' => 'int',
        'img_url' => 'string',
        'create_time' => 'int',
        'update_time' => 'int',
    ];

    public function saveRecard($data) {
        $finance = new Finance;
        $result = $finance->save($data);
        return $result;
    }

    public function getList($where) {
        $result =  Finance::where($where)->select()->toArray();
        // echo "<br>";
        // var_dump($result);
        // echo "<br>";exit;
        return $result;
    }
}
